package com.cnhis.cloudhealth.clinical.hosnurse.executionorder.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.dao.BaseDao;
import com.cnhis.cloudhealth.commons.utils.GlobalVariable;
import com.cnhis.cloudhealth.commons.utils.Page;

@Repository
public class HosExecutionOrderDao extends BaseDao{
   public Page patientList(Map map,int currPage,int pageSize)throws Exception{
        return queryForPage("HosExecutionOrder.patientList", map, currPage, pageSize);
   }
   public Page examine(Map map,int currPage,int pageSize)throws Exception{
	   return queryForPage("HosExecutionOrder.examine", map, currPage, pageSize);
   }
   public Page  checkOut(Map map,int currPage,int pageSize)throws Exception{
	   return queryForPage("HosExecutionOrder.checkOut", map, currPage, pageSize); 
   }
   
   public List areaPatientList(Map map)throws Exception{
	   return queryForList("HosExecutionOrder.areaPatientList", map);
   }
   public List queryItems(Map map)throws Exception{
	   return queryForList("HosExecutionOrder.queryItems", map);
   }
   public Page queryAdviceList(Map map,int currPage,int pageSize)throws Exception{
	   return queryForPage("HosExecutionOrder.queryAdviceList", map, currPage, pageSize);
   }
   public List getTmp_VAE(Map map)throws Exception{
	    return queryForList("HosExecutionOrder.getTmp_VAE", map);
   }

    public List getBarcodeInfo(Map map)throws Exception{
        return queryForList("HosExecutionOrder.getBarcodeInfo", map);
    }
    public void insertExeRecord(Map map)throws Exception{
        insert("HosExecutionOrder.insertExeRecord", map);
    }

    public void updateExeRecord(Map map)throws Exception{
        insert("HosExecutionOrder.updateExeRecord", map);
    }
    public List patientList1(Map map) throws Exception
    {
        return queryForList("HosExecutionOrder.patientList1", map);
    }
    public List examine1(HashMap map) throws Exception
    {
        int type = GlobalVariable.IntegerIsNull(map.get("type"));
        if(type==1)
        {
            return queryForList("HosExecutionOrder.examine2", map);
        }
        else
        {
            return queryForList("HosExecutionOrder.examine1", map);
        }
        
    }

}
